unit umain;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,udata, dic_oneforfour,uproperties;

type

  { Tgolovna }

  Tgolovna = class(TForm)
    MainMenu1: TMainMenu;
    MenuItem1: TMenuItem;
    MenuItem10: TMenuItem;
    MenuItem11: TMenuItem;
    MenuItem12: TMenuItem;
    MenuItem2: TMenuItem;
    MenuItem3: TMenuItem;
    MenuItem4: TMenuItem;
    MenuItem5: TMenuItem;
    MenuItem6: TMenuItem;
    MenuItem7: TMenuItem;
    MenuItem8: TMenuItem;
    MenuItem9: TMenuItem;
    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure MenuItem12Click(Sender: TObject);
    procedure MenuItem8Click(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  golovna: Tgolovna;
  WhatIsForm:Integer;

implementation

{$R *.lfm}

{ Tgolovna }

procedure Tgolovna.FormCreate(Sender: TObject);
begin
  golovna.WindowState:=wsMaximized;
end;

procedure Tgolovna.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
  Application.MainForm.Close;
end;

procedure Tgolovna.FormDestroy(Sender: TObject);
begin
  INI.Free;
end;

procedure Tgolovna.MenuItem12Click(Sender: TObject);
begin
   FormProperties.ShowModal;
end;

procedure Tgolovna.MenuItem8Click(Sender: TObject);
begin
  WhatIsForm:= Integer((Sender as TMenuItem).Tag);
  dic_oneforfive.ShowModal;
end;

end.

